package com.seeyon.apps.ssoAndDoc.utils;

import org.apache.commons.codec.binary.Base64;

public class Base64Util {
    private static final Base64 base = new Base64();

    /**
     * 编码
     * <p>Title: getBaseString</p>
     * <p>Description: </p>
     * @param data
     * @return
     */
    public static String getBaseString(byte[] data) {
        return base.encodeToString(data);
    }

    /**
     * 解码
     * <p>Title: getBaseArray</p>
     * <p>Description: </p>
     * @param data
     * @return
     */
    public static byte[] getBaseArray(String data) {
        return base.decode(data);
    }
}
